1. Field of the Invention
The present invention relates generally to a system providing methods for facilitating development and maintenance of software programs or systems, with particular emphasis on techniques that allow model information, such as Unified Modeling Language (UML) model information, to be moved into a program's run-time environment by means of source code—that is, to bring the entire model into code-representable elements.
2. Description of the Background Art
Before a digital computer may accomplish a desired task, it must receive an appropriate set of instructions. Executed by the computer's microprocessor, these instructions, collectively referred to as a “computer program,” direct the operation of the computer. Expectedly, the computer must understand the instructions which it receives before it may undertake the specified activity.
Owing to their digital nature, computers essentially only understand “machine code,” i.e., the low-level, minute instructions for performing specific tasks—the sequence of ones and zeros that are interpreted as specific instructions by the computer's microprocessor. Since machine language or machine code is the only language computers actually understand, all other programming languages represent ways of structuring human language so that humans can get computers to perform specific tasks. While it is possible for humans to compose meaningful programs in machine code, practically all software development today employs one or more of the available programming languages. The most widely used programming languages are the “high-level” languages, such as C, C++, Pascal, or more recently Java® and C#. These languages allow data structures and algorithms to be expressed in a style of writing that is easily read and understood by fellow programmers.
A program called a “compiler” translates these instructions into the requisite machine language. In the context of this translation, the program written in the high-level language is called the “source code” or source program. The ultimate output of the compiler is a compiled module such as a compiled C “object module”, which includes instructions for execution ultimately by a target processor, or a compiled Java® class, which includes bytecodes for execution ultimately by a Java® virtual machine. A Java® compiler generates platform-neutral “bytecodes”, an architecturally neutral, intermediate format designed for deploying application code efficiently to multiple platforms.
“Visual” development environments, such as Borland's JBuilder® or Borland's C# Builder™, are the preferred application development environments for quickly creating production applications. Such environments are characterized by an integrated development environment (IDE) providing a form painter, a property getter/setter manager (“inspector”), a project manager, a tool palette (with objects which the user can drag and drop on forms), an editor, and a compiler. In general operation, the user “paints” objects on one or more forms, using the form painter. Attributes and properties of the objects on the forms can be modified using the property manager or inspector. In conjunction with this operation, the user attaches or associates program code with particular objects on screen (e.g., button objects); the editor is used to edit program code which has been attached to particular objects. After the program code has been developed, the compiler is used to generate binary code for execution on a machine (e.g., Intel native machine code for execution on Intel-compatible microprocessors or Java® bytecode for execution on a Java® virtual machine).
Although visual development environments enable applications to be created quickly, problems remain with the development, implementation, and maintenance of software applications. One problem is that modern software applications are increasingly complex. In an object-oriented development environment, software applications are developed as a set of objects and classes that interact with one another. It is difficult for developers to use those objects and classes unless they fully understand the relationships between them. For example, to change the name of a method in a java application a developer has to find all classes that invoke the method, so that the invocations of the method are updated accordingly. All told, application developers and other users are required to understand complex relationships between components of software systems in order to develop, implement, and maintain such systems.
Various approaches have been made to assist users in handling this increased complexity. A current technology for understanding complex object-oriented software systems is the Unified Modeling Language (UML). UML is a standard graphical language for modeling object-oriented systems. For further information on UML, see e.g., “OMG Unified Modeling Language Specification (Version 1.5, March 2003)” available from the Object Management Group, Inc., the disclosure of which is hereby incorporated by reference. A copy of this specification is available via the Internet (e.g., currently at (www)omg.org). UML, at its simplest, is a language that graphically describes a set of elements. At its most complex, UML is used to specify, visualize, construct, and document not only software systems but also business models and non-software systems. Much like a blueprint for constructing a building, UML provides a graphical representation of a system design that may be used by developers to assure architectural soundness of a system. UML is frequently used to design the relationships between components (e.g., classes in the case of a Java program) before such components are developed and implemented in source code format. For example, UML class diagrams allow the structure of a system to be specified in a language-neutral fashion, without involvement in all of the various implementation details such as persistence, business domain implementation, and technical behavior of the system.
A number of UML design tools are available for use in conjunction with the design and development of a software system. However, there is a large gap between a UML class model and a running application, primarily due to the lack of implementation details in a UML class model as well as the fact that to date no compiler has been written that consumes “pure” UML models. Current UML design tools are focused on system design and are not well integrated with the source code program that is ultimately created. In those systems, the model that is created a design time (design artifact) has no direct code representation. Typically a developer uses a UML design tool for program design but then after initial design of the model is complete, the developer ceases to evolve the model into a better design. This is because present-day UML design tools and development tools are not well integrated. In particular, the UML diagrams that are created to model one's program are not reflected in the program's code as it executes at run time. Although one may attempt to place the design artifacts in “comments” to source code (i.e., source code comments, which represent text ignored by the compiler) or in a proprietary format, those attempts of course omit the model information from the code that is actually compiled into the application. Therefore, they do not provide a means for allowing model information to be reachable at run time via the application's own compiled code.
There are several possible ways to address this gap between a UML model and a running application that is implemented based on the model. The traditional approach has been for the developer to look at the UML model and use it as “inspiration” during the implementation phase. However, this traditional approach is subject to the limitations described above. Another possible approach is to generate code for implementing the model based on the structural information and certain specified technical behavior. This approach may, however, be difficult to effectively implement and also does not ensure that the model can be restored at run time. A preferred approach is to use the UML model information as meta data for a run-time framework. However, in this case, the problem that then arises is how to move the information expressed in the UML model into the run-time framework.
What is needed is a solution that allows model information, such as UML model information, to be moved into a program's run-time environment by means of source code. The present invention fulfills these and other needs.